/*
 * JuridicalPersonWS.java
 * 
 * Created: Jul 6, 2015
 * 
 * Copyright (c) ExpertPB 2015
 * All information contained herein is, and remains the property of
 * ExpertPB and its suppliers, if any.
 */
package com.emex.app.web;

import com.emex.app.shared.data.JuridicalPerson;
import com.emex.app.shared.ws.JuridicalPersonWebService;
import com.emex.app.web.service.JuridicalPersonService;
import java.util.List;
import javax.ejb.Stateless;
import javax.jws.WebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;

/**
 *
 * @author Sergey
 */
@WebService(serviceName = "JuridicalPersonWS", portName = "JuridicalPersonWSPort", targetNamespace = "http://emex.com/JuridicalPerson")
@Stateless(name = "JuridicalPersonWS")
public class JuridicalPersonWS extends SpringBeanAutowiringSupport implements JuridicalPersonWebService {
    
    @Autowired
    private JuridicalPersonService juridicalPersonService;

    @Override
    public int deleteJuridicalPersonByPrimaryKey(Integer id) {
        return juridicalPersonService.deleteJuridicalPersonByPrimaryKey(id);
    }

    @Override
    public JuridicalPerson insertJuridicalPerson(JuridicalPerson record) {
        return juridicalPersonService.insertJuridicalPerson(record);
    }

    @Override
    public JuridicalPerson selectJuridicalPersonByPrimaryKey(Integer id) {
        return juridicalPersonService.selectJuridicalPersonByPrimaryKey(id);
    }

    @Override
    public JuridicalPerson updateJuridicalPerson(JuridicalPerson record) {
        return juridicalPersonService.updateJuridicalPerson(record);
    }

    @Override
    public List<JuridicalPerson> getAllJuridicalPersons() {
        return juridicalPersonService.getAllJuridicalPersons();
    }
    
    @Override
    public List<JuridicalPerson> getAllJuridicalPeronsByName(String name) {
        return juridicalPersonService.getAllJuridicalPeronsByName(name);
    }

}
